Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MWRAPPER-108] Emit clear error message when download fails on U*IX #130

Merged
merged 2 commits into from
Apr 17, 2024

Conversation

cstamas
Copy link
Member

@cstamas cstamas commented Apr 17, 2024

Script silently just failed. Reused changes from dead PR #98 w/ help of @michael-o 👍 Thanks both!


https://issues.apache.org/jira/browse/MWRAPPER-108

@cstamas
Copy link
Member Author

cstamas commented Apr 17, 2024

@michael-o ouch, the IT failed on Windows... so same should be done there as well.... 🆘

@michael-o
Copy link
Member

@michael-o ouch, the IT failed on Windows... so same should be done there as well.... 🆘

Let guess: Those images have the tools installed...

@michael-o
Copy link
Member

WTF:

icm : Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (404) Not Found."
At line:1 char:125
+ ... 'mvnw.cmd'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Invoke-Command], MethodInvocationException
    + FullyQualifiedErrorId : WebException,Microsoft.PowerShell.Commands.InvokeCommandCommand
 
VERBOSE: Couldn't find MAVEN_HOME, downloading and installing it ...
VERBOSE: Downloading from: http://localhost:62622/org/apache/maven/apache-maven/0.0.0/apache-maven-0.0.0-bin.zip
VERBOSE: Downloading to: C:\Users\runneradmin\AppData\Local\Temp\tmp6E64.tmp.dir/apache-maven-0.0.0-bin.zip
Cannot start maven from wrapper  

@cstamas
Copy link
Member Author

cstamas commented Apr 17, 2024

Seems this issue affected only non-windows scripts, as on Windows is not wget/curl downloading, and that something does emit sensible error (got 404). But on non-Windows OSes, the message was unclear, as it reported error like "missing XXX" instead "could not download".

@cstamas cstamas changed the title [MWRAPPER-108] Emit clear error message when download fails [MWRAPPER-108] Emit clear error message when download fails on U*IX Apr 17, 2024
@cstamas cstamas merged commit 8f95ee9 into master Apr 17, 2024
51 checks passed
@cstamas cstamas deleted the MWRAPPER-108 branch April 17, 2024 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants